﻿Imports System.ComponentModel

Public Class Customer
    Implements INotifyPropertyChanged

    Private _strFirstName As String = String.Empty
    Private _strLastName As String = String.Empty

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Public Property FirstName() As String
        Get
            Return _strFirstName
        End Get
        Set(ByVal Value As String)
            _strFirstName = Value
            OnPropertyChanged("FirstName")
        End Set
    End Property

    Public Property LastName() As String
        Get
            Return _strLastName
        End Get
        Set(ByVal Value As String)
            _strLastName = Value
            OnPropertyChanged("LastName")
        End Set
    End Property

    Protected Sub OnPropertyChanged(ByVal strPropertyName As String)

        If Me.PropertyChangedEvent IsNot Nothing Then

            RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(strPropertyName))

        End If
    End Sub
End Class
